package com.ruoyi.tccs.tccs_display_esimate.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tccs.tccs_display_esimate.mapper.TccsDisplayEsimateMapper;
import com.ruoyi.tccs.tccs_display_esimate.domain.TccsDisplayEsimate;
import com.ruoyi.tccs.tccs_display_esimate.service.ITccsDisplayEsimateService;

/**
 * 显示参考Service业务层处理
 * 
 * @author RenZhengYang
 * @date 2024-04-06
 */
@Service
public class TccsDisplayEsimateServiceImpl implements ITccsDisplayEsimateService 
{
    @Autowired
    private TccsDisplayEsimateMapper tccsDisplayEsimateMapper;

    /**
     * 查询显示参考
     * 
     * @param id 显示参考主键
     * @return 显示参考
     */
    @Override
    public TccsDisplayEsimate selectTccsDisplayEsimateById(Long id)
    {
        return tccsDisplayEsimateMapper.selectTccsDisplayEsimateById(id);
    }

    /**
     * 查询显示参考列表
     * 
     * @param tccsDisplayEsimate 显示参考
     * @return 显示参考
     */
    @Override
    public List<TccsDisplayEsimate> selectTccsDisplayEsimateList(TccsDisplayEsimate tccsDisplayEsimate)
    {
        return tccsDisplayEsimateMapper.selectTccsDisplayEsimateList(tccsDisplayEsimate);
    }

    /**
     * 新增显示参考
     * 
     * @param tccsDisplayEsimate 显示参考
     * @return 结果
     */
    @Override
    public int insertTccsDisplayEsimate(TccsDisplayEsimate tccsDisplayEsimate)
    {
        tccsDisplayEsimate.setCreateTime(DateUtils.getNowDate());
        return tccsDisplayEsimateMapper.insertTccsDisplayEsimate(tccsDisplayEsimate);
    }

    /**
     * 修改显示参考
     * 
     * @param tccsDisplayEsimate 显示参考
     * @return 结果
     */
    @Override
    public int updateTccsDisplayEsimate(TccsDisplayEsimate tccsDisplayEsimate)
    {
        tccsDisplayEsimate.setUpdateTime(DateUtils.getNowDate());
        return tccsDisplayEsimateMapper.updateTccsDisplayEsimate(tccsDisplayEsimate);
    }

    /**
     * 批量删除显示参考
     * 
     * @param ids 需要删除的显示参考主键
     * @return 结果
     */
    @Override
    public int deleteTccsDisplayEsimateByIds(Long[] ids)
    {
        return tccsDisplayEsimateMapper.deleteTccsDisplayEsimateByIds(ids);
    }

    /**
     * 删除显示参考信息
     * 
     * @param id 显示参考主键
     * @return 结果
     */
    @Override
    public int deleteTccsDisplayEsimateById(Long id)
    {
        return tccsDisplayEsimateMapper.deleteTccsDisplayEsimateById(id);
    }
}
